﻿#include "mainwindow.h"
#include "ui_mainwindow.h"

MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
    , ui(new Ui::MainWindow)
{
    ui->setupUi(this);
}

MainWindow::~MainWindow()
{
    delete ui;
}


void MainWindow::on_dial_valueChanged(int value)
{
    ui->lcdNumber->display(value);
}

void MainWindow::on_radioButton_10_clicked()
{
    ui->lcdNumber->setDigitCount(3);
    ui->lcdNumber->setMode(QLCDNumber::Dec);
}

void MainWindow::on_radioButton_2_clicked()
{
    ui->lcdNumber->setDigitCount(8);
    ui->lcdNumber->setMode(QLCDNumber::Bin);
}

void MainWindow::on_radioButton_8_clicked()
{
    ui->lcdNumber->setDigitCount(3);
    ui->lcdNumber->setMode(QLCDNumber::Oct);
}

void MainWindow::on_radioButton_16_clicked()
{
    ui->lcdNumber->setDigitCount(2);
    ui->lcdNumber->setMode(QLCDNumber::Hex);
}
